import request from '@/utils/request'

// 查询医院列表
export function getHospitalList(params: any) {
  return request({
    url: '/system/hospital/list',
    method: 'get',
    params
  })
}

// 查询医院详细
export function getHospitalDetail(hospitalId: number) {
  return request({
    url: `/system/hospital/${hospitalId}`,
    method: 'get'
  })
}

// 新增医院
export function addHospital(data: any) {
  return request({
    url: '/system/hospital',
    method: 'post',
    data
  })
}

// 修改医院
export function updateHospital(data: any) {
  return request({
    url: '/system/hospital',
    method: 'put',
    data
  })
}

// 删除医院
export function deleteHospital(hospitalId: number) {
  return request({
    url: `/system/hospital/${hospitalId}`,
    method: 'delete'
  })
}